/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package isd.ventas.modelo;

import isd.general.modelo.GR_Concepto;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.DiscriminatorType;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

/**
 *
 * @author ctrosch
 */
@Entity
@Table(name = "VTRMVI", schema = "dbo")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "VTRMVI_TIPCPT", discriminatorType = DiscriminatorType.STRING, length = 1)
public abstract class VT_ItemMovimientoVenta implements Serializable {
    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected VT_ItemMovimientoVentaPK id;

    @JoinColumns({
        @JoinColumn(name = "VTRMVI_MODFOR", referencedColumnName = "VTRMVH_MODFOR", nullable = false, insertable=false, updatable=false),
        @JoinColumn(name = "VTRMVI_CODFOR", referencedColumnName = "VTRMVH_CODFOR", nullable = false, insertable=false, updatable=false),
        @JoinColumn(name = "VTRMVI_NROFOR", referencedColumnName = "VTRMVH_NROFOR", nullable = false, insertable=false, updatable=false)        
    })
    @ManyToOne
    VT_MovimientoVenta movimiento;

    @JoinColumns({
        @JoinColumn(name = "VTRMVI_MODAPL", referencedColumnName = "FCRMVH_MODFOR", nullable = false, insertable=false, updatable=false),
        @JoinColumn(name = "VTRMVI_CODAPL", referencedColumnName = "FCRMVH_CODFOR", nullable = false, insertable=false, updatable=false),
        @JoinColumn(name = "VTRMVI_NROAPL", referencedColumnName = "FCRMVH_NROFOR", nullable = false, insertable=false, updatable=false)
    })
    @ManyToOne
    VT_MovimientoVenta movimientoAplicacion;

    @JoinColumns({
        @JoinColumn(name = "VTRMVI_MODCPT", referencedColumnName = "GRCCOH_MODCPT", nullable = false, insertable=false, updatable=false),
        @JoinColumn(name = "VTRMVI_TIPCPT", referencedColumnName = "GRCCOH_TIPCPT", nullable = false, insertable=false, updatable=false),
        @JoinColumn(name = "VTRMVI_CODCPT", referencedColumnName = "GRCCOH_CODCPT", nullable = false, insertable=false, updatable=false)
    })
    @ManyToOne
    GR_Concepto concepto;

    /**
    @Basic(optional = false)
    @Column(name = "VTRMVI_MODCPT", nullable = false, length = 2)
    private String modcpt;
    @Basic(optional = false)
    @Column(name = "VTRMVI_TIPCPT", nullable = false)
    private char tipcpt;
    @Basic(optional = false)
    @Column(name = "VTRMVI_CODCPT", nullable = false, length = 6)
    private String codcpt;
    @Basic(optional = false)
    */

    @Column(name = "VTRMVI_CUENTA", nullable = false, length = 40)
    private String cuenta;
    @Column(name = "VTRMVI_CANTID", precision = 18, scale = 4)
    private BigDecimal cantid;
    @Column(name = "VTRMVI_FACTOR", precision = 12, scale = 6)
    private BigDecimal factor;
    @Column(name = "VTRMVI_UNIMED", length = 6)
    private String unimed;
    @Column(name = "VTRMVI_TIPUNI", length = 1)
    private String tipuni;
    @Column(name = "VTRMVI_UNIFAC", length = 6)
    private String unifac;
    @Column(name = "VTRMVI_FACFAC", precision = 12, scale = 6)
    private BigDecimal facfac;
    @Column(name = "VTRMVI_CNTFAC", precision = 18, scale = 4)
    private BigDecimal cntfac;
    @Column(name = "VTRMVI_UNIALT", length = 6)
    private String unialt;
    @Column(name = "VTRMVI_FACALT", precision = 12, scale = 6)
    private BigDecimal facalt;
    @Column(name = "VTRMVI_CNTALT", precision = 18, scale = 4)
    private BigDecimal cntalt;
    @Column(name = "VTRMVI_UNICON", length = 6)
    private String unicon;
    @Column(name = "VTRMVI_FACCON", precision = 12, scale = 6)
    private BigDecimal faccon;
    @Column(name = "VTRMVI_CNTCON", precision = 18, scale = 4)
    private BigDecimal cntcon;

    //Precio viejo
    @Column(name = "VTRMVI_OLDPRE", precision = 20, scale = 6)
    private BigDecimal oldpre;

    //Precio nuevo
    @Column(name = "VTRMVI_NEWPRE", precision = 20, scale = 6)
    private BigDecimal newpre;


    @Column(name = "VTRMVI_PRENAC", precision = 20, scale = 6)
    private BigDecimal prenac;

    //Importe nacionar
    @Column(name = "VTRMVI_IMPNAC", precision = 18, scale = 2)
    private BigDecimal impnac;

    @Column(name = "VTRMVI_PREUSS", precision = 20, scale = 6)
    private BigDecimal preuss;

    @Column(name = "VTRMVI_IMPUSS", precision = 18, scale = 2)
    private BigDecimal impuss;

    @Column(name = "VTRMVI_PREEXT", precision = 20, scale = 6)
    private BigDecimal preext;

    @Column(name = "VTRMVI_IMPEXT", precision = 18, scale = 2)
    private BigDecimal impext;

    @Column(name = "VTRMVI_PCINAC", precision = 20, scale = 6)
    private BigDecimal pcinac;
    @Column(name = "VTRMVI_ICINAC", precision = 18, scale = 2)
    private BigDecimal icinac;
    @Column(name = "VTRMVI_PCIEXT", precision = 20, scale = 6)
    private BigDecimal pciext;
    @Column(name = "VTRMVI_ICIEXT", precision = 18, scale = 2)
    private BigDecimal iciext;
    @Column(name = "VTRMVI_PCIUSS", precision = 20, scale = 6)
    private BigDecimal pciuss;
    @Column(name = "VTRMVI_ICIUSS", precision = 18, scale = 2)
    private BigDecimal iciuss;

    //Importe debe
    @Column(name = "VTRMVI_IMPDEB", precision = 18, scale = 2)
    private BigDecimal impdeb;

    //Importe haber
    @Column(name = "VTRMVI_IMPHAB", precision = 18, scale = 2)
    private BigDecimal imphab;

    @Column(name = "VTRMVI_CUOAPL")
    private Short cuoapl;
    @Lob
    @Column(name = "VTRMVI_TEXTOS", length = 2147483647)
    private String textos;

    @Column(name = "VTRMVI_TIPDES", length = 6)
    private String tipdes;
    @Column(name = "VTRMVI_ARTDES", length = 30)
    private String artdes;
    @Column(name = "VTRMVI_NSERIE", length = 30)
    private String nserie;
    @Column(name = "VTRMVI_NDESPA", length = 30)
    private String ndespa;
    @Column(name = "VTRMVI_ENVASE", length = 30)
    private String envase;
    @Column(name = "VTRMVI_NOTROS", length = 30)
    private String notros;
    @Lob
    @Column(name = "VTRMVI_TSERIE", length = 2147483647)
    private String tserie;
    @Lob
    @Column(name = "VTRMVI_TDESPA", length = 2147483647)
    private String tdespa;
    @Lob
    @Column(name = "VTRMVI_TENVAS", length = 2147483647)
    private String tenvas;
    @Lob
    @Column(name = "VTRMVI_TOTROS", length = 2147483647)
    private String totros;    

    @Column(name = "VTRMVI_MODORI", length = 2)
    private String modori;
    @Column(name = "VTRMVI_CODORI", length = 6)
    private String codori;
    @Column(name = "VTRMVI_NROORI")
    private Integer nroori;
    @Column(name = "VTRMVI_ITMORI")
    private Integer itmori;
    @Column(name = "VTRMVI_EXPORI", length = 2)
    private String expori;
    @Column(name = "VTRMVI_PCTBF1", precision = 15, scale = 7)
    private BigDecimal pctbf1;
    @Column(name = "VTRMVI_PCTBF2", precision = 15, scale = 7)
    private BigDecimal pctbf2;
    @Column(name = "VTRMVI_PCTBF3", precision = 15, scale = 7)
    private BigDecimal pctbf3;
    @Column(name = "VTRMVI_PCTBF4", precision = 15, scale = 7)
    private BigDecimal pctbf4;
    @Column(name = "VTRMVI_PCTBF5", precision = 15, scale = 7)
    private BigDecimal pctbf5;
    @Column(name = "VTRMVI_PCTBF6", precision = 15, scale = 7)
    private BigDecimal pctbf6;
    @Column(name = "VTRMVI_PCTBF7", precision = 15, scale = 7)
    private BigDecimal pctbf7;
    @Column(name = "VTRMVI_PCTBF8", precision = 15, scale = 7)
    private BigDecimal pctbf8;
    @Column(name = "VTRMVI_PCTBF9", precision = 15, scale = 7)
    private BigDecimal pctbf9;
    @Column(name = "VTRMVI_PCTBFN", precision = 15, scale = 7)
    private BigDecimal pctbfn;
    @Column(name = "VTRMVI_USSDEB", precision = 18, scale = 2)
    private BigDecimal ussdeb;
    @Column(name = "VTRMVI_USSHAB", precision = 18, scale = 2)
    private BigDecimal usshab;
    @Column(name = "VTRMVI_EXTDEB", precision = 18, scale = 2)
    private BigDecimal extdeb;
    @Column(name = "VTRMVI_EXTHAB", precision = 18, scale = 2)
    private BigDecimal exthab;
    @Column(name = "VTRMVI_CODCON", length = 6)
    private String codcon;
    @Column(name = "VTRMVI_NROCON", length = 10)
    private String nrocon;
    @Column(name = "VTRMVI_NROEXT")
    private Short nroext;
    @Column(name = "VTRMVI_ITMCON")
    private Integer itmcon;
    @Column(name = "VTRMVI_IMPORI", precision = 18, scale = 2)
    private BigDecimal impori;
    @Column(name = "VTRMVI_NFECHA", length = 30)
    private String nfecha;
    @Column(name = "VTRMVI_NATRIB", length = 30)
    private String natrib;
    @Column(name = "VTRMVI_NUBICA", length = 30)
    private String nubica;
    @Column(name = "VTRMVI_NESTAN", length = 30)
    private String nestan;
    @Lob
    @Column(name = "VTRMVI_TFECHA", length = 2147483647)
    private String tfecha;
    @Lob
    @Column(name = "VTRMVI_TATRIB", length = 2147483647)
    private String tatrib;
    @Lob
    @Column(name = "VTRMVI_TUBICA", length = 2147483647)
    private String tubica;
    @Lob
    @Column(name = "VTRMVI_TESTAN", length = 2147483647)
    private String testan;
    @Column(name = "VTRMVI_CLAMOV", length = 2)
    private String clamov;
    @Column(name = "VTRMVI_IMPSEC", precision = 18, scale = 2)
    private BigDecimal impsec;
    @Column(name = "VTRMVI_SECDEB", precision = 18, scale = 2)
    private BigDecimal secdeb;
    @Column(name = "VTRMVI_SECHAB", precision = 18, scale = 2)
    private BigDecimal sechab;
    @Column(name = "VTRMVI_TIPOPR", length = 6)
    private String tipopr;
    @Column(name = "VTRMVI_CODOPR", length = 30)
    private String codopr;
    @Column(name = "VTRMVI_TASA01", precision = 15, scale = 4)
    private BigDecimal tasa01;
    @Column(name = "VTRMVI_TASA02", precision = 15, scale = 4)
    private BigDecimal tasa02;
    @Column(name = "VTRMVI_TASA03", precision = 15, scale = 4)
    private BigDecimal tasa03;
    @Column(name = "VTRMVI_TASA04", precision = 15, scale = 4)
    private BigDecimal tasa04;
    @Column(name = "VTRMVI_TASA05", precision = 15, scale = 4)
    private BigDecimal tasa05;
    @Column(name = "VTRMVI_TASA06", precision = 15, scale = 4)
    private BigDecimal tasa06;
    @Column(name = "VTRMVI_IMPU01", precision = 15, scale = 4)
    private BigDecimal impu01;
    @Column(name = "VTRMVI_IMPU02", precision = 15, scale = 4)
    private BigDecimal impu02;
    @Column(name = "VTRMVI_IMPU03", precision = 15, scale = 4)
    private BigDecimal impu03;
    @Column(name = "VTRMVI_IMPU04", precision = 15, scale = 4)
    private BigDecimal impu04;
    @Column(name = "VTRMVI_IMPU05", precision = 15, scale = 4)
    private BigDecimal impu05;
    @Column(name = "VTRMVI_IMPU06", precision = 15, scale = 4)
    private BigDecimal impu06;
    @Column(name = "VTRMVI_CODEMP", length = 10)
    private String codemp;
    @Column(name = "VTRMVI_EMPORI", length = 10)
    private String empori;
    @Column(name = "VTRMVI_EMPAPL", length = 10)
    private String empapl;
    @Column(name = "VTRMVI_EMPCON", length = 10)
    private String empcon;
    @Column(name = "VTRMVI_FECALT")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecalt;
    @Column(name = "VTRMVI_FECMOD")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecmod;
    @Column(name = "VTRMVI_USERID", length = 15)
    private String userid;
    @Column(name = "VTRMVI_ULTOPR")
    private Character ultopr;
    @Column(name = "VTRMVI_DEBAJA")
    private Character debaja;
    @Column(name = "VTRMVI_HORMOV", length = 10)
    private String hormov;
    @Column(name = "VTRMVI_MODULE", length = 10)
    private String module;
    @Column(name = "VTRMVI_OALIAS", length = 10)
    private String oalias;

    @Transient
    private BigDecimal precioFinalConIVA;

    @Transient
    private BigDecimal precioFinalSinIVA;

    @Transient
    private BigDecimal totalLineaConIVA;

    public VT_ItemMovimientoVenta() {
    }

    public VT_ItemMovimientoVenta(VT_ItemMovimientoVentaPK id) {
        this.id = id;
    }

    public VT_ItemMovimientoVenta(VT_ItemMovimientoVentaPK id, GR_Concepto concepto, String cuenta) {
        this.id = id;
        this.concepto = concepto;
        this.cuenta = cuenta;
    }

    public VT_ItemMovimientoVenta(String modfor, String codfor, int nrofor, int nroitm, String debhab) {
        this.id = new VT_ItemMovimientoVentaPK(modfor, codfor, nrofor, nroitm, debhab);
    }

    public VT_ItemMovimientoVentaPK getId() {
        return id;
    }

    public void setId(VT_ItemMovimientoVentaPK id) {
        this.id = id;
    }

    public VT_MovimientoVenta getMovimiento() {
        return movimiento;
    }

    public void setMovimiento(VT_MovimientoVenta movimiento) {
        this.movimiento = movimiento;
    }
   
    public String getArtdes() {
        return artdes;
    }

    public void setArtdes(String artdes) {
        this.artdes = artdes;
    }

    public BigDecimal getCantid() {
        return cantid;
    }

    public void setCantid(BigDecimal cantid) {
        this.cantid = cantid;
    }

    public String getClamov() {
        return clamov;
    }

    public void setClamov(String clamov) {
        this.clamov = clamov;
    }

    public BigDecimal getCntalt() {
        return cntalt;
    }

    public void setCntalt(BigDecimal cntalt) {
        this.cntalt = cntalt;
    }

    public BigDecimal getCntcon() {
        return cntcon;
    }

    public void setCntcon(BigDecimal cntcon) {
        this.cntcon = cntcon;
    }

    public BigDecimal getCntfac() {
        return cntfac;
    }

    public void setCntfac(BigDecimal cntfac) {
        this.cntfac = cntfac;
    }

    public String getCodcon() {
        return codcon;
    }

    public void setCodcon(String codcon) {
        this.codcon = codcon;
    }

    public String getCodemp() {
        return codemp;
    }

    public void setCodemp(String codemp) {
        this.codemp = codemp;
    }

    public String getCodopr() {
        return codopr;
    }

    public void setCodopr(String codopr) {
        this.codopr = codopr;
    }

    public String getCodori() {
        return codori;
    }

    public void setCodori(String codori) {
        this.codori = codori;
    }

    public GR_Concepto getConcepto() {
        return concepto;
    }

    public void setConcepto(GR_Concepto concepto) {
        this.concepto = concepto;
    }
    
    public String getCuenta() {
        return cuenta;
    }

    public void setCuenta(String cuenta) {
        this.cuenta = cuenta;
    }

    public Short getCuoapl() {
        return cuoapl;
    }

    public void setCuoapl(Short cuoapl) {
        this.cuoapl = cuoapl;
    }

    public Character getDebaja() {
        return debaja;
    }

    public void setDebaja(Character debaja) {
        this.debaja = debaja;
    }

    public String getEmpapl() {
        return empapl;
    }

    public void setEmpapl(String empapl) {
        this.empapl = empapl;
    }

    public String getEmpcon() {
        return empcon;
    }

    public void setEmpcon(String empcon) {
        this.empcon = empcon;
    }

    public String getEmpori() {
        return empori;
    }

    public void setEmpori(String empori) {
        this.empori = empori;
    }

    public String getEnvase() {
        return envase;
    }

    public void setEnvase(String envase) {
        this.envase = envase;
    }

    public String getExpori() {
        return expori;
    }

    public void setExpori(String expori) {
        this.expori = expori;
    }

    public BigDecimal getExtdeb() {
        return extdeb;
    }

    public void setExtdeb(BigDecimal extdeb) {
        this.extdeb = extdeb;
    }

    public BigDecimal getExthab() {
        return exthab;
    }

    public void setExthab(BigDecimal exthab) {
        this.exthab = exthab;
    }

    public BigDecimal getFacalt() {
        return facalt;
    }

    public void setFacalt(BigDecimal facalt) {
        this.facalt = facalt;
    }

    public BigDecimal getFaccon() {
        return faccon;
    }

    public void setFaccon(BigDecimal faccon) {
        this.faccon = faccon;
    }

    public BigDecimal getFacfac() {
        return facfac;
    }

    public void setFacfac(BigDecimal facfac) {
        this.facfac = facfac;
    }

    public BigDecimal getFactor() {
        return factor;
    }

    public void setFactor(BigDecimal factor) {
        this.factor = factor;
    }

    public Date getFecalt() {
        return fecalt;
    }

    public void setFecalt(Date fecalt) {
        this.fecalt = fecalt;
    }

    public Date getFecmod() {
        return fecmod;
    }

    public void setFecmod(Date fecmod) {
        this.fecmod = fecmod;
    }

    public String getHormov() {
        return hormov;
    }

    public void setHormov(String hormov) {
        this.hormov = hormov;
    }

    public BigDecimal getIciext() {
        return iciext;
    }

    public void setIciext(BigDecimal iciext) {
        this.iciext = iciext;
    }

    public BigDecimal getIcinac() {
        return icinac;
    }

    public void setIcinac(BigDecimal icinac) {
        this.icinac = icinac;
    }

    public BigDecimal getIciuss() {
        return iciuss;
    }

    public void setIciuss(BigDecimal iciuss) {
        this.iciuss = iciuss;
    }

    public BigDecimal getImpdeb() {
        return impdeb;
    }

    public void setImpdeb(BigDecimal impdeb) {
        this.impdeb = impdeb;
    }

    public BigDecimal getImpext() {
        return impext;
    }

    public void setImpext(BigDecimal impext) {
        this.impext = impext;
    }

    public BigDecimal getImphab() {
        return imphab;
    }

    public void setImphab(BigDecimal imphab) {
        this.imphab = imphab;
    }

    public BigDecimal getImpnac() {
        return impnac;
    }

    public void setImpnac(BigDecimal impnac) {
        this.impnac = impnac;
    }

    public BigDecimal getImpori() {
        return impori;
    }

    public void setImpori(BigDecimal impori) {
        this.impori = impori;
    }

    public BigDecimal getImpsec() {
        return impsec;
    }

    public void setImpsec(BigDecimal impsec) {
        this.impsec = impsec;
    }

    public BigDecimal getImpu01() {
        return impu01;
    }

    public void setImpu01(BigDecimal impu01) {
        this.impu01 = impu01;
    }

    public BigDecimal getImpu02() {
        return impu02;
    }

    public void setImpu02(BigDecimal impu02) {
        this.impu02 = impu02;
    }

    public BigDecimal getImpu03() {
        return impu03;
    }

    public void setImpu03(BigDecimal impu03) {
        this.impu03 = impu03;
    }

    public BigDecimal getImpu04() {
        return impu04;
    }

    public void setImpu04(BigDecimal impu04) {
        this.impu04 = impu04;
    }

    public BigDecimal getImpu05() {
        return impu05;
    }

    public void setImpu05(BigDecimal impu05) {
        this.impu05 = impu05;
    }

    public BigDecimal getImpu06() {
        return impu06;
    }

    public void setImpu06(BigDecimal impu06) {
        this.impu06 = impu06;
    }

    public BigDecimal getImpuss() {
        return impuss;
    }

    public void setImpuss(BigDecimal impuss) {
        this.impuss = impuss;
    }

    public Integer getItmcon() {
        return itmcon;
    }

    public void setItmcon(Integer itmcon) {
        this.itmcon = itmcon;
    }

    public Integer getItmori() {
        return itmori;
    }

    public void setItmori(Integer itmori) {
        this.itmori = itmori;
    }

    public String getModori() {
        return modori;
    }

    public void setModori(String modori) {
        this.modori = modori;
    }

    public String getModule() {
        return module;
    }

    public void setModule(String module) {
        this.module = module;
    }

    public String getNatrib() {
        return natrib;
    }

    public void setNatrib(String natrib) {
        this.natrib = natrib;
    }

    public String getNdespa() {
        return ndespa;
    }

    public void setNdespa(String ndespa) {
        this.ndespa = ndespa;
    }

    public String getNestan() {
        return nestan;
    }

    public void setNestan(String nestan) {
        this.nestan = nestan;
    }

    public BigDecimal getNewpre() {
        return newpre;
    }

    public void setNewpre(BigDecimal newpre) {
        this.newpre = newpre;
    }

    public String getNfecha() {
        return nfecha;
    }

    public void setNfecha(String nfecha) {
        this.nfecha = nfecha;
    }

    public String getNotros() {
        return notros;
    }

    public void setNotros(String notros) {
        this.notros = notros;
    }

    public String getNrocon() {
        return nrocon;
    }

    public void setNrocon(String nrocon) {
        this.nrocon = nrocon;
    }

    public Short getNroext() {
        return nroext;
    }

    public void setNroext(Short nroext) {
        this.nroext = nroext;
    }

    public Integer getNroori() {
        return nroori;
    }

    public void setNroori(Integer nroori) {
        this.nroori = nroori;
    }

    public String getNserie() {
        return nserie;
    }

    public void setNserie(String nserie) {
        this.nserie = nserie;
    }

    public String getNubica() {
        return nubica;
    }

    public void setNubica(String nubica) {
        this.nubica = nubica;
    }

    public String getOalias() {
        return oalias;
    }

    public void setOalias(String oalias) {
        this.oalias = oalias;
    }

    public BigDecimal getOldpre() {
        return oldpre;
    }

    public void setOldpre(BigDecimal oldpre) {
        this.oldpre = oldpre;
    }

    public BigDecimal getPciext() {
        return pciext;
    }

    public void setPciext(BigDecimal pciext) {
        this.pciext = pciext;
    }

    public BigDecimal getPcinac() {
        return pcinac;
    }

    public void setPcinac(BigDecimal pcinac) {
        this.pcinac = pcinac;
    }

    public BigDecimal getPciuss() {
        return pciuss;
    }

    public void setPciuss(BigDecimal pciuss) {
        this.pciuss = pciuss;
    }

    public BigDecimal getPctbf1() {
        return pctbf1;
    }

    public void setPctbf1(BigDecimal pctbf1) {
        this.pctbf1 = pctbf1;
    }

    public BigDecimal getPctbf2() {
        return pctbf2;
    }

    public void setPctbf2(BigDecimal pctbf2) {
        this.pctbf2 = pctbf2;
    }

    public BigDecimal getPctbf3() {
        return pctbf3;
    }

    public void setPctbf3(BigDecimal pctbf3) {
        this.pctbf3 = pctbf3;
    }

    public BigDecimal getPctbf4() {
        return pctbf4;
    }

    public void setPctbf4(BigDecimal pctbf4) {
        this.pctbf4 = pctbf4;
    }

    public BigDecimal getPctbf5() {
        return pctbf5;
    }

    public void setPctbf5(BigDecimal pctbf5) {
        this.pctbf5 = pctbf5;
    }

    public BigDecimal getPctbf6() {
        return pctbf6;
    }

    public void setPctbf6(BigDecimal pctbf6) {
        this.pctbf6 = pctbf6;
    }

    public BigDecimal getPctbf7() {
        return pctbf7;
    }

    public void setPctbf7(BigDecimal pctbf7) {
        this.pctbf7 = pctbf7;
    }

    public BigDecimal getPctbf8() {
        return pctbf8;
    }

    public void setPctbf8(BigDecimal pctbf8) {
        this.pctbf8 = pctbf8;
    }

    public BigDecimal getPctbf9() {
        return pctbf9;
    }

    public void setPctbf9(BigDecimal pctbf9) {
        this.pctbf9 = pctbf9;
    }

    public BigDecimal getPctbfn() {
        return pctbfn;
    }

    public void setPctbfn(BigDecimal pctbfn) {
        this.pctbfn = pctbfn;
    }

    public BigDecimal getPreext() {
        return preext;
    }

    public void setPreext(BigDecimal preext) {
        this.preext = preext;
    }

    public BigDecimal getPrenac() {
        return prenac;
    }

    public void setPrenac(BigDecimal prenac) {
        this.prenac = prenac;
    }

    public BigDecimal getPreuss() {
        return preuss;
    }

    public void setPreuss(BigDecimal preuss) {
        this.preuss = preuss;
    }

    public BigDecimal getSecdeb() {
        return secdeb;
    }

    public void setSecdeb(BigDecimal secdeb) {
        this.secdeb = secdeb;
    }

    public BigDecimal getSechab() {
        return sechab;
    }

    public void setSechab(BigDecimal sechab) {
        this.sechab = sechab;
    }

    public BigDecimal getTasa01() {
        return tasa01;
    }

    public void setTasa01(BigDecimal tasa01) {
        this.tasa01 = tasa01;
    }

    public BigDecimal getTasa02() {
        return tasa02;
    }

    public void setTasa02(BigDecimal tasa02) {
        this.tasa02 = tasa02;
    }

    public BigDecimal getTasa03() {
        return tasa03;
    }

    public void setTasa03(BigDecimal tasa03) {
        this.tasa03 = tasa03;
    }

    public BigDecimal getTasa04() {
        return tasa04;
    }

    public void setTasa04(BigDecimal tasa04) {
        this.tasa04 = tasa04;
    }

    public BigDecimal getTasa05() {
        return tasa05;
    }

    public void setTasa05(BigDecimal tasa05) {
        this.tasa05 = tasa05;
    }

    public BigDecimal getTasa06() {
        return tasa06;
    }

    public void setTasa06(BigDecimal tasa06) {
        this.tasa06 = tasa06;
    }

    public String getTatrib() {
        return tatrib;
    }

    public void setTatrib(String tatrib) {
        this.tatrib = tatrib;
    }

    public String getTdespa() {
        return tdespa;
    }

    public void setTdespa(String tdespa) {
        this.tdespa = tdespa;
    }

    public String getTenvas() {
        return tenvas;
    }

    public void setTenvas(String tenvas) {
        this.tenvas = tenvas;
    }

    public String getTestan() {
        return testan;
    }

    public void setTestan(String testan) {
        this.testan = testan;
    }

    public String getTextos() {
        return textos;
    }

    public void setTextos(String textos) {
        this.textos = textos;
    }

    public String getTfecha() {
        return tfecha;
    }

    public void setTfecha(String tfecha) {
        this.tfecha = tfecha;
    }

    public String getTipdes() {
        return tipdes;
    }

    public void setTipdes(String tipdes) {
        this.tipdes = tipdes;
    }

    public String getTipopr() {
        return tipopr;
    }

    public void setTipopr(String tipopr) {
        this.tipopr = tipopr;
    }

    public String getTipuni() {
        return tipuni;
    }

    public void setTipuni(String tipuni) {
        this.tipuni = tipuni;
    }

    public String getTotros() {
        return totros;
    }

    public void setTotros(String totros) {
        this.totros = totros;
    }

    public String getTserie() {
        return tserie;
    }

    public void setTserie(String tserie) {
        this.tserie = tserie;
    }

    public String getTubica() {
        return tubica;
    }

    public void setTubica(String tubica) {
        this.tubica = tubica;
    }

    public Character getUltopr() {
        return ultopr;
    }

    public void setUltopr(Character ultopr) {
        this.ultopr = ultopr;
    }

    public String getUnialt() {
        return unialt;
    }

    public void setUnialt(String unialt) {
        this.unialt = unialt;
    }

    public String getUnicon() {
        return unicon;
    }

    public void setUnicon(String unicon) {
        this.unicon = unicon;
    }

    public String getUnifac() {
        return unifac;
    }

    public void setUnifac(String unifac) {
        this.unifac = unifac;
    }

    public String getUnimed() {
        return unimed;
    }

    public void setUnimed(String unimed) {
        this.unimed = unimed;
    }

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    public BigDecimal getUssdeb() {
        return ussdeb;
    }

    public void setUssdeb(BigDecimal ussdeb) {
        this.ussdeb = ussdeb;
    }

    public BigDecimal getUsshab() {
        return usshab;
    }

    public void setUsshab(BigDecimal usshab) {
        this.usshab = usshab;
    }

    public BigDecimal getPrecioFinalConIVA() {
        try {
            if (prenac != null) {

                precioFinalConIVA = BigDecimal.ZERO;
                BigDecimal bonif = prenac.multiply(pctbfn.divide(new BigDecimal(100)));
                BigDecimal impUnit = prenac.add(bonif);

                if (concepto.getId().getCodcpt().equals("V001")) {
                    precioFinalConIVA = impUnit.multiply(new BigDecimal(1.21));
                }
                if (concepto.getId().getCodcpt().equals("V002")) {
                    precioFinalConIVA = impUnit.multiply(new BigDecimal(1.105));
                }
                if (concepto.getId().getCodcpt().equals("V003")) {
                    precioFinalConIVA = impUnit;
                }
            }

            return precioFinalConIVA;

        } catch (Exception e) {

            return BigDecimal.ZERO;
        }
    }

    public void setPrecioFinalConIVA(BigDecimal precioFinalConIVA) {
        this.precioFinalConIVA = precioFinalConIVA;
    }

    public BigDecimal getTotalLineaConIVA() {
        try {
            if (cantid != null) {

                totalLineaConIVA = BigDecimal.ZERO;
                BigDecimal bonif = prenac.multiply(pctbfn.divide(new BigDecimal(100)));
                BigDecimal impUnit = prenac.add(bonif);
                BigDecimal impTotal = cantid.multiply(impUnit);


                if (concepto.getId().getCodcpt().equals("V001")) {
                    totalLineaConIVA = impTotal.multiply(new BigDecimal(1.21));
                }
                if (concepto.getId().getCodcpt().equals("V002")) {
                    totalLineaConIVA = impTotal.multiply(new BigDecimal(1.105));
                }
                if (concepto.getId().getCodcpt().equals("V003")) {
                    totalLineaConIVA = impTotal;
                }
            }

            return totalLineaConIVA;

        } catch (Exception e) {

            return BigDecimal.ZERO;
        }
    }

    public void setTotalLineaConIVA(BigDecimal totalLineaConIVA) {
        this.totalLineaConIVA = totalLineaConIVA;
    }

    public VT_MovimientoVenta getMovimientoAplicacion() {
        return movimientoAplicacion;
    }

    public void setMovimientoAplicacion(VT_MovimientoVenta movimientoAplicacion) {
        this.movimientoAplicacion = movimientoAplicacion;
    }

    public BigDecimal getPrecioFinalSinIVA() {
        try {
            if (prenac != null) {

                precioFinalSinIVA = BigDecimal.ZERO;
                BigDecimal bonif = prenac.multiply(pctbfn.divide(new BigDecimal(100)));
                BigDecimal impUnit = prenac.add(bonif);
                precioFinalSinIVA = impUnit;
            }

            return precioFinalSinIVA;

        } catch (Exception e) {

            return BigDecimal.ZERO;
        }
    }

    public void setPrecioFinalSinIVA(BigDecimal precioFinalSinIVA) {
        this.precioFinalSinIVA = precioFinalSinIVA;
    }


    

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof VT_ItemMovimientoVenta)) {
            return false;
        }
        VT_ItemMovimientoVenta other = (VT_ItemMovimientoVenta) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "tv.venta.modelo.ItemMovimientoVenta[id=" + id + "]";
    }

}
